package com.tz.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * Created by heziqian on 2016/10/21.
 */
@Entity
@Table(name = "ONLINE_USER")
public class User implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 7012481625922717852L;
	private Long userId;
	private String username;
	private String password;
	private String tel;
	private String email;
	private String address;
	private String company;
	public User() {
		super();
	}
	public User(String username, String password, String tel, String email,
			String address, String company) {
		super();
		this.username = username;
		this.password = password;
		this.tel = tel;
		this.email = email;
		this.address = address;
		this.company = company;
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "user_id")
	@SequenceGenerator(name = "user_id", sequenceName = "online_user_id")
	public Long getUserId() {
		return userId;
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	
	@Column
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	
	@Column
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	
	@Column
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	
	@Column
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	
	@Column
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	
	@Column
	public String getCompany() {
		return company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	@Override
	public String toString() {
		return "User [userId=" + userId + ", username=" + username
				+ ", password=" + password + ", tel=" + tel + ", email="
				+ email + ", address=" + address + ", company=" + company + "]";
	}
	
	
	
	
	
}
